//index.js
//获取应用实例
const app = getApp()
var common = require('../common/common.js')

console.log(app.globalData)
Page({
  /**
   * page of init data
   */
  data:{
    time:(new Date()).toString(),
    v2: undefined,
    v3: null,
    v4: "var4",
    a:10,
    b:2,
    c:1,
    lenght:5,
    condition:0,
    array:[{msg:'1'},{msg:'2'}]

  },
  //onLoad:function(options)同下方一样实现
  onLoad(options){
    common.sayHello ('kk')
    common.sayGoodbye('kk')
  },
  onReady(){

  },
  onShow(){
    console.log(this.route)
    console.log(this.route)
  },
  onHide(){

  },
  onUnload(){

  },
  onPullDownRefresh(){

  },
  onReachBottom(){

  },

  viewTap(){
    this.setData({
      text:'set some data for updating view'
    }),
    function(){

    }
  },
  customData:{
    hi:'MINA'
  },
  helloMina:function(){
    commen.sayHello('mina')
  }

})
